public class Player 
{
    /* Constantes */
    public static final String defaultName = "Nenhum nome associado"; /* Nome a retornar dar caso o nome esteja vazio */
    
    /* Variaveis de instancia */
    private String name;
    private final int color;
    private final ColPawns CP;
    
    /**
     * 
     * @param color 
     */
    public Player(int color) 
    {
        this.color = color;
        this.name = "";
        this.CP = new ColPawns();
    }

    /**
     * 
     * @return 
     */
    public String getName() 
    {
        return name.isEmpty() ? defaultName : name;
    }

    /**
     * 
     * @param name 
     */
    public void setName(String name) 
    {
        this.name = name;
    }

    /**
     * 
     * @return 
     */
    public int getColor() 
    {
        return color;
    }

    /**
     * 
     * @param id
     * @return 
     */
    public Pawn getPawn(int id)
    {
        return CP.getPawn(id);
    }
    
    /**
     * 
     * @return 
     */
    public int getPawnFinishCount() 
    {
        return CP.getPawnFinishCount();
    }
    
    /**
     * 
     * @param pawnFinishCount 
     */
    public void setPawnFinishCount(int pawnFinishCount) 
    {
        CP.setPawnFinishCount(pawnFinishCount);
    }
    
    /**
     * 
     */
    public void incPawnFinishCount()
    {
        CP.incPawnFinishCount();
    }
}